package cn.diancan.service;


import java.util.List;

import cn.diancan.exception.OutMsgException;
import cn.diancan.model.SysManager;
 

public interface SysManagerService {

     /**
     * 通过管理员名称查找
     * @param name
     * @return
     * @throws OutMsgException 
     */
    public SysManager findByManagerName(String managerName) throws OutMsgException;
    
    /**
     * 通过管理员id查找
     * @param managerId
     * @return
     */
    public SysManager findByManagerId(Long managerId)throws OutMsgException;
    
    /**
     * 开通管理员账号
     * @param manager
     * @throws OutMsgException 
     */
    public boolean saveMangerAccount(SysManager manager) throws OutMsgException;
    
    /**
     * 登陆
     * @param managerName
     * @param psw
     * @return
     * @throws OutMsgException 
     */
    public SysManager findLogined(String managerName,String psw) throws OutMsgException;
    
    /**
     * 管理员列表
     * @return
     */
    public List<SysManager> findByAllManager();
    
    /**
     * 更改账户信息
     * @param manager
     * @return 
     * @throws OutMsgException 
     */
    public boolean updateManager(SysManager manager) throws OutMsgException,Exception;
    
    /**
     * 启用禁用账号
     * @param id
     * @param is
     */
	public boolean updateIsDelete(Long id, int is)throws OutMsgException,Exception;
	/**
	 * 给管理员设置角色
	 * @param bManager
	 * @return 
	 * @throws OutMsgException 
	 */
	public boolean saveMangerRole(SysManager bManager) throws OutMsgException;



}
